#/bin/bash
for file in *.mp3
do
	echo "Processing $file ..."
	fname="$(basename -- "$file")"
	fbname=${fname%.*}

	regex="\s([0-9]*)\s-\s(.*).mp3"

    if [[ $file =~ $regex ]]
    then
        track="${BASH_REMATCH[1]}"
        name="${BASH_REMATCH[2]}"
        echo track ${track} name ${name}
    else
        echo "$f doesn't match" >&2
        continue;
    fi

    #echo -t "${name}" -a "Знакомство с жизнью" -r "Людмила Шторк" -y "2014" -c "$track" "${file}"
	id3 -t "${name}" -l "Знакомство с жизнью" -a "Людмила Шторк" -y "2014" -n "$track" "${file}"
done